<template>
  <div>
    <!-- <el-input
      type="text"
      v-model="username"
      placeholder="请输入用户名"> -->
      <el-button v-copy="copyText">复制</el-button>
      <!-- <span v-show-tips class="overText">{{ www }}</span> -->
  </div>
</template>
<script>
import Vue from 'vue'
import copy from './cus/copy'
// import longpress from './cus/longpress'
Vue.directive('copy', copy)
// Vue.directive('showTips', longpress)
export default {
  data () {
    return {
      username: '',
      copyText: 'a copy directives',
      www: 'wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww'
    }
  },
  created () {},
  methods: {}
}
</script>
<style>
.overText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 80px;
  display: inline-block;
}
</style>
